<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
  	<!-- Add to homescreen for Safari on iOS -->
  	<meta name="apple-mobile-web-app-title" content="MAGGIEMAO"/>
  	<link rel="apple-touch-icon-precomposed" href="{{URL::to('assets/i/app-icon72x72.png')}}">

  	<!-- Add to homescreen for Chrome on Android -->
  	<meta name="mobile-web-app-capable" content="yes">
  	<link rel="icon" sizes="192x192" href="{{URL::to('assets/i/app-icon72x72.png')}}">
  	
  	<!-- Tile icon for Win8 (144x144 + tile color) -->
  	<meta name="msapplication-TileImage" content="{{URL::to('assets/i/app-icon72x72.png')}}">
  	<meta name="msapplication-TileColor" content="#0e90d2">
  
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta name="renderer" content="webkit">
    @section("title")
    <title>MAGGIE MAO The Floral Art | 蔓茂花廊</title>
    @show
    <!-- Path to Framework7 Library CSS-->
    {{ HTML::style('assets/f7/css/framework7.ios.css') }}
    {{ HTML::style('assets/f7/css/framework7.ios.colors.css') }}
    {{ HTML::style('assets/f7/select/css/cs-select.css') }}
    <!-- Path to your custom app styles-->
    {{ HTML::style('assets/f7/css/mobile.css?version=6') }}
    @section("css")
    @show
  </head>
  <body class="layout-white">
    <!-- Status bar overlay for fullscreen mode-->
    <div class="statusbar-overlay"></div>
    <!-- Panels overlay-->
    <div class="panel-overlay m-sidebar"></div>
    <!-- Left panel with reveal effect-->
    <div class="panel panel-left panel-cover m-sidebar">
      <div class="view panel-view">
	      <div class="navbar">
		      <div class="navbar-inner">
		        <div class="left">
		        	<a href="{{URL::to('/stories')}}" class="link external">The Stories</a>
		        </div>
		        <div class="right">
		        	<a href="#page-login" class="link close-panel" id="user-start-action">登录/注册</a>
		        </div>
		        <!-- Sub navbar -->
		        <div class="subnavbar">
		           <form class="searchbar" action="{{URL::to('search')}}" method="post">
				        <div class="searchbar-input">
				            <input type="search" placeholder="Search" name="q">
				            <a href="#" class="searchbar-clear"></a>
				        </div>
				        <a href="#" class="searchbar-cancel">Cancel</a>
				        {{Form::token()}}
				    </form>
		        </div>
		      </div>
	    </div>
	    <div class="pages navbar-through">
	      <!-- Pag has additional "with-subnavbar" class -->
	      <div data-page="navbar" class="page with-subnavbar">
	        <div class="page-content">
	         <div class="m-list-block list-block no-border">
		   	  	<ul>
		   	  	  <li class="item-content">
		   	  	  	<a href="{{URL::to('/')}}" class="external">
			        <div class="item-inner">
			          <div class="item-title">首页</div>
			        </div>
			        </a>
			      </li>
			      @foreach ($projects as $pp)
			      <li class="item-content">
			      	<a href="{{$pp->url}}"  class="external">
			        <div class="item-inner">
			          <div class="item-title"><span 
			          	style="{{!empty($pp->color) ? 'color:'.$pp->color.';' : ''}}">{{$pp->name}}</span></div>
			        </div>
			        </a>
			      </li>
			       @foreach ($pp->children as $child)
			       		<li class="item-content secondary">
			       			<a href="{{$child->url}}"  class="external">
					        <div class="item-inner">
					          <div class="item-title">
					          	<span
					          		style="{{!empty($child->color) ? 'color:'.$child->color.';' : ''}}">{{$child->name}}</span>
					          </div>
					        </div>
					        </a>
					      </li>
				   @endforeach
			      @endforeach
			      
			      <!-- 
		          <li class="item-content">
			        <div class="item-inner">
			          <div class="item-title"><a href="{{URL::to('/product-list')}}"  class="external">所有商品</a></div>
			        </div>
			      </li>
			       -->
			      
			      @foreach ($tree as $parent)
			      <li class="item-content">
			      	<a href="{{URL::to('/product-list',$parent->id)}}"  class="external">
			        <div class="item-inner">
			          <div class="item-title">
			          	<span style="{{!empty($parent->color) ? 'color:'.$parent->color.';' : ''}}">{{$parent->name}}</span>
			          </div>
			        </div>
			        </a>
			      </li>
			       @foreach ($parent->children as $child)
			       		<li class="item-content secondary">
			       			<a href="{{URL::to('/product-list',$child->id)}}"  class="external">
					        <div class="item-inner">
					          <div class="item-title">
					          <span style="{{!empty($child->color) ? 'color:'.$child->color.';' : ''}}">{{$child->name}}</span>
					          </div>
					        </div>
					        </a>
					      </li>
				   @endforeach
			      @endforeach
			      </ul>
		      </div>
		      <div class="m-notice">
		   	  	<span>满@config('mao.free_postage_limit')元免运费</span><br>
		   	  	<span class="subtip">国际地区运费请咨询客服：<a href="tel:400-710-8990" class="external">400-710-8990</a></span>
		   	  	@if(!empty($notice->holiday))
		   	  	<br><span class="tip">{{$notice->holiday}}</span>
		   	  	@endif
		   	  </div>
		   	  
		   	  <div class="m-list-block list-block no-border">
		   	  	<ul>
		   	  	  <li class="item-content">
		   	  	  	<a href="{{URL::to('about')}}" class="external">
			        <div class="item-inner">
			          <div class="item-title">关于花廊</div>
			        </div>
			        </a>
			      </li>
			      <li class="item-content">
			      	<a href="{{URL::to('guide')}}" class="external">
			        <div class="item-inner">
			          <div class="item-title">购物指南</div>
			        </div>
			        </a>
			      </li>
			      <li class="item-content">
			      	<a href="{{URL::to('contact')}}" class="external">
			        <div class="item-inner">
			          <div class="item-title">联系我们</div>
			        </div>
			        </a>
			      </li>
			      <li class="item-content">
			      	<a href="{{URL::to('faq')}}" class="external">
			        <div class="item-inner">
			          <div class="item-title">常见问题</div>
			        </div>
			        </a>
			      </li>
			    </ul>
		   	  </div>
	        </div>
	      </div>
	    </div>
      </div>
    </div>
    
    <!-- Right panel with cover effect
    <div class="panel panel-right panel-cover">
      <div class="content-block">
        <p>Right panel content goes here</p>
      </div>
    </div>
    -->
    
    <!-- Views-->
    <div class="views">
      <!-- Your main view, should have "view-main" class-->
      <div class="view view-main">
        
        <!-- Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes-->
        <div class="pages">
          <!-- Page, data-page contains page name-->
          @section("page-index")
          @show
          <div data-page="page-login" class="page navbar-fixed cached">
          	<div class="navbar text-navbar">
				<div class="navbar-inner">
					<div class="left">
						<!-- Right link contains only icon - additional "icon-only" class-->
						<a href="#" class="link back"> <i class="icon2 icon-arrow-left"></i> 返回</a>
					</div>
					<div class="center">
						登录 / 注册
					</div>
				</div>
			</div>
            <!-- Scrollable page content-->
            <div class="page-content">
            	<div class="content-padded">
            		<form action="{{URL::to('login')}}" method="post" class="ajax-submit" name="login-form" 
            			enctype="application/x-www-form-urlencoded">
	           		<h3>已注册用户</h3>
	           		
	           		<div class="m-form-control">
					 	<input type="text" placeholder="手机号/电子邮箱地址" name="mobile" class="validate"
						            	data-rules="required" data-display="登录账号">
					</div>
					<div class="m-form-control">
						<input type="password" placeholder="密码" name="password" class="validate"
						            	data-display="密码" data-rules="required" >
					</div>
	           		
	           		<a class="forgot" href="#page-forgot">忘记密码?</a>
	           		{{Form::token()}}
	           		<input type="hidden" name="guest" value="{{empty($login) ? 0 : $login}}"/>
	           		<button type="submit" class="button button-big m-button">登录 </button>
	           		</form>
	           		
	           		<h3 style="margin-top:2rem;">新用户</h3>
	           		<p>如果您还不是我们的用户，请在此注册</p>
	           		<a href="#page-register" class="button button-big m-button">注册</a>
           		</div>
            </div>
          </div>
          
          <div data-page="page-forgot" class="page navbar-fixed cached">
          	<div class="navbar text-navbar">
				<div class="navbar-inner">
					<div class="left">
						<!-- Right link contains only icon - additional "icon-only" class-->
						<a href="#" class="link back"> <i class="icon2 icon-arrow-left"></i> 返回</a>
					</div>
					<div class="center">
						忘记密码
					</div>
				</div>
			</div>
            <!-- Scrollable page content-->
            <div class="page-content">
            	<div class="content-padded">
            		<form name="forgot-form" id="forget-form" action="{{URL::to('forgot')}}" method="post" class="ajax-submit">
	           		<h3>已注册用户</h3>
	           		<!-- 
	           		<p>请填写您用于注册账户的电子邮箱地址，我们将会发送一封邮件到您的邮箱，以便您重置密码</p>
	           		 -->
	           		<div class="m-form-control" id="forget-moible-input">
						<label>手机<span class="text-red">*</span></label>
						<input type="text" class="validate" id="mobile" name="mobile" 
							data-rules="required|mobile" data-display="手机号" placeholder="输入手机号">
					</div>
					
	           		<div class="m-form-control" id="forget-verify-input">
	           			<label>验证码<span class="text-red">*</span></label>
	           			<div class="m-form-group">
	           				<input type="text" placeholder="验证码" name="verifyCode" class="validate"
						            	data-rules="required" data-display="验证码">
							<button class="button" type="button">获取验证码 </button>      
	           			</div>
					</div>
					<div class="m-form-control">
						<label>密码<span class="text-red">*</span></label>
						 <input type="password" class="validate" id="password" name="password" 
					data-rules="required|min_length[6]|max_length[64]|alpha_dash|matches[password_confirmation]" data-display="密码" placeholder="密码最少6位(字母,数字,下划线)">
					</div>
					
					<div class="m-form-control">
						<label>确认密码<span class="text-red">*</span></label>
						<input type="password" class="validate" id="password_confirmation " name="password_confirmation" 
						data-rules="required" data-display="确认密码" placeholder="输入密码">
					</div>
	           		
	           		{{Form::token()}}
	           		<button type="submit" class="button button-big m-button">密码修改 </button>
	           		</form>
           		</div>
            </div>
          </div>
          
          <div data-page="page-forgot-success" class="page navbar-fixed cached">
          	<div class="navbar text-navbar">
				<div class="navbar-inner">
					<div class="left sliding">
						<!-- Right link contains only icon - additional "icon-only" class-->
						<a  href="#" class="link back-main"> <i class="icon2 icon-arrow-left"></i> 返回</a>
					</div>
					<div class="center sliding">
						忘记密码
					</div>
				</div>
			</div>
            <!-- Scrollable page content-->
            <div class="page-content">
            	<div class="content-padded">
            		<!-- 
	           		<h3>申请已成功提交</h3>
	           		<p>您找回密码的申请已成功收到，您即将收到一封电子邮件，请按照其提示操作。</p>
	           		 -->
	           		<h3>修改密码成功</h3>
	           		<p>您现在可以用新密码进行登录。</p>
	           		<a href="#" class="button button-big m-button back-main">确认 </a>
           		</div>
            </div>
          </div>
          
          <div data-page="page-register" class="page navbar-fixed cached">
          	<div class="navbar text-navbar">
				<div class="navbar-inner">
					<div class="left">
						<!-- Right link contains only icon - additional "icon-only" class-->
						<a  href="#" class="link back"> <i class="icon2 icon-arrow-left"></i> 返回</a>
					</div>
					<div class="center title">
						新用户注册
					</div>
				</div>
			</div>
            <!-- Scrollable page content-->
            <div class="page-content">
            	<div class="content-padded">
            		<form id="register-form" name="register-form" method="post" action="{{URL::to('register')}}" class="ajax-submit">
	           		<h3>新用户注册</h3>
	           		
	           		<div class="m-form-control">
	           			<label>姓名<span class="text-red">*</span></label>
						<input type="text" class="validate" id="name" name="name" 
									data-rules="required|max_length[32]" data-display="姓名" placeholder="输入姓名">
					</div>
					
					<div class="m-form-control" id="forget-mobile-input">
						<label>手机<span class="text-red">*</span></label>
						<input type="text" class="validate" id="mobile" name="mobile" 
							data-rules="required|mobile" data-display="手机号" placeholder="输入手机号">
					</div>
					<div class="m-form-control" id="register-verify-input">
	           			<label>验证码<span class="text-red">*</span></label>
	           			<div class="m-form-group">
	           				<input type="text" placeholder="验证码" name="verifyCode" class="validate"
						            	data-rules="required" data-display="验证码">
							<button class="button button-default" type="button">获取验证码 </button>      
	           			</div>
					</div>
					<div class="m-form-control">
						<label>邮箱<span class="text-red">*</span></label>
						 <input type="text" class="validate" id="email" name="email" 
					data-rules="required|max_length[128]|valid_email" data-display="电子邮箱" placeholder="输入电子邮箱">
					</div>
					
					<div class="m-form-control">
						<label>密码<span class="text-red">*</span></label>
						 <input type="password" class="validate" id="password" name="password" 
					data-rules="required|min_length[6]|max_length[64]|alpha_dash|matches[password_confirmation]" data-display="密码" placeholder="密码最少6位(字母,数字,下划线)">
					</div>
					
					<div class="m-form-control">
						<label>确认密码<span class="text-red">*</span></label>
						<input type="password" class="validate" id="password_confirmation " name="password_confirmation" 
						data-rules="required" data-display="确认密码" placeholder="输入密码">
					</div>
	    		  {{Form::token()}}
	    		  <button type="submit" class="button button-big m-button">注册</button>
	    		  </form>
           		</div>
            </div>
          </div>
          
          <div data-page="page-register-success" class="page navbar-fixed cached">
          	<div class="navbar text-navbar">
				<div class="navbar-inner">
					<div class="left sliding">
						<!-- Right link contains only icon - additional "icon-only" class-->
						<a  href="#" class="link back-main"> <i class="icon2 icon-arrow-left"></i> 返回</a>
					</div>
					<div class="center sliding">
						注册成功
					</div>
				</div>
			</div>
            <!-- Scrollable page content-->
            <div class="page-content">
            	<div class="content-padded">
            		<!-- 
	           		<h3>申请已成功提交</h3>
	           		<p>感谢您注册<span class='georgia'>MAGGIEMAO</span>蔓茂花廊，您即将收到一封电子邮件，请前往您的邮箱点击激活链接。</p>
	           		 -->
	           		 <h3>注册成功</h3>
	           		 <p>感谢您注册<span class='georgia'>MAGGIEMAO</span>蔓茂花廊，您可以使用新账户登录了。</p>
	           		<a href="#" class="button button-big m-button back-main">关闭 </a>
           		</div>
            </div>
          </div>
          @section("more-pages")
          @show
        </div>
        
        <!-- Bottom Toolbar
        <div class="toolbar">
          <div class="toolbar-inner"><a href="#" class="link">Link 1</a><a href="#" class="link">Link 2</a></div>
        </div>
        -->
      </div>
    </div>
    
    <!-- Path to Framework7 Library JS-->
    {{ HTML::script('assets/f7/js/framework7.js') }}
    {{HTML::script('assets/js/validator/validator.js?version=1')}}
    
    {{HTML::script('assets/f7/select/js/selectFx.js')}}
    {{ HTML::script('assets/f7/js/mobile.js') }}
    <script type="text/javascript">
    	$$.config = {
            base:'{{URL::to('/')}}/',
    		image:'{{Config::get("mao.image_domain")}}',
    		login:{{Auth::check() ? 'true' : 'false'}},
    		user:'{{Auth::check() ? Auth::user()["name"]:null}}',
    		cart_timeout:5000,
    		postage:@config('mao.postage'),
    		freePostageLimit:@config('mao.free_postage_limit'),
    		showLogin:'{{empty($login) ? 0 : $login}}'
    	};	
    </script>
    @section("script")
    @show
  </body>
</html>